<?php
class SaveRelationship{
	function SaveRelationship(&$bean, $event, $arguments){
//		
//$fp = sugar_fopen('PANJUN.php', 'w');
//ob_start();
//var_dump($_POST);
//var_dump($_REQUEST);
//fwrite($fp, ob_get_contents());
//fclose($fp);
		if ($_REQUEST['return_module']=='Tasks') {
			$task = new Task();
			$task->retrieve($_REQUEST['relate_id']);
			if (!empty($task)) {
				$_REQUEST['relate_id'] = $task->deliverable_id;
				$_REQUEST['relate_to'] = "edanz_Deliverables";
			}
		}
	}
	
}
?>
